<!--
 * @Description: 
 * @Version: 2.0
 * @Date: 2024-04-10 14:32:35
 * @LastEditTime: 2024-05-06 13:49:53
-->
<template>
  <el-dialog
    show-close
    draggable
    destroy-on-close
    :style="props.style"
    :model-value="props.dialogVisible"
    :close-on-click-modal="false"
    @open="handleOpen"
    @close="handleClose"
  >
    <slot></slot>
  </el-dialog>
</template>

<script setup lang="ts">
const props = defineProps({
  // 弹窗状态
  dialogVisible: Boolean,
  //   弹窗样式
  style: Object,
});

const emits = defineEmits(["update:visible"]);

const handleOpen = () => {
  // dialog opened
};

// 将状态回传
const handleClose = () => {
  emits("update:visible", false);
  // dialog closed
};
</script>
